//
//  RegisterSerViceViewController.m
//  GoBigMarket
//
//  Created by legend on 2016/10/28.
//  Copyright © 2016年 legend. All rights reserved.
//

#import "RegisterSerViceViewController.h"

@interface RegisterSerViceViewController ()
@property (weak, nonatomic) IBOutlet UIWebView *webView;

@end

@implementation RegisterSerViceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"注册协议";
    //BuyerAppAPI/Message/GetAgreement
    
}
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
    [CQNetWorkTools GETWithURL:GetAgreement par:@{} success:^(id responseObject) {
        if ([responseObject objectForKey:@"Agreement"]) {

            NSDictionary *Agreement = [responseObject objectForKey:@"Agreement"];
    
            NSString *urlStr = [NSString stringWithFormat:@"%@%@",ReleaseORDebug,[Agreement objectForKey:@"Url"]];
//            NSLog(@"%@",urlStr);
            //url
            NSURL *url = [NSURL URLWithString:urlStr];
            //request
            NSURLRequest *request = [NSURLRequest requestWithURL:url];
            [self.webView loadRequest:request];

        }
        
    } filed:^(NSError *error) {
        
    }];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
